import request, { download } from '@/utils/request'
// 下载
/**
 * 
 * @param {*} data //入参
 * @param {*} filename //下载文件名称以及文件后缀为文件类型
 * @returns 
 */
export function downloadexport (data, filename) {
  return download(
    '/function/check/stock/consumable/export',
    data,
    filename
  )
}
// 设备巡检列表
export function getSelectinspectionList (query) {
  return request({
    url: '/function/inspection/list',
    method: 'get',
    params: query
  })
}
// 设备巡检详情
export function getSelectinspectionChildren (query) {
  return request({
    url: '/function/inspection/' + query,
    method: 'get',
  })
}
// 区域巡检设备列表
export function getSelectAreainspectionList (query) {
  return request({
    url: '/function/inspection/area/equipment/list',
    method: 'get',
    params: query
  })
}
// 区域巡检设备列表
export function getSelectPlanAreainspectionList (query) {
  return request({
    url: '/function/inspection/task/area/equipments/list',
    method: 'get',
    params: query
  })
}
// 查询巡检计划列表
export function getSelectplanList (query) {
  return request({
    url: '/function//inspection/plan/list',
    method: 'get',
    params: query
  })
}
// 修改巡检计划状态
export function putUpdateplanstatus (data) {
  return request({
    url: '/function//inspection/plan/status',
    method: 'put',
    data
  })
}
// 查询巡检任务区域设备
export function getSelectplanAreaList (query) {
  return request({
    url: '/function//inspection/plan/area/equipments/list',
    method: 'get',
    params: query
  })
}
// 新增巡检计划
export function postCreatelanstatus (data) {
  return request({
    url: '/function//inspection/plan',
    method: 'post',
    data
  })
}
// 查询巡检计划详情
export function getSelectplanAreaChildren (id) {
  return request({
    url: '/function//inspection/plan/' + id,
    method: 'get',
  })
}
// 查询巡检计划明细列表
export function getSelectplanAreadetailList (query) {
  return request({
    url: '/function//inspection/plan/detail/list',
    method: 'get',
    params: query
  })
}
// 查询巡检计划明细列表
export function getSelecttaskList (query) {
  return request({
    url: '/function/inspection/task/list',
    method: 'get',
    params: query
  })
}
// 查询巡检我的任务列表
export function getSelecttaskMyList (query) {
  return request({
    url: '/function/inspection/task/my/list',
    method: 'get',
    params: query
  })
}
// 查询巡检任务下设备
export function getSelectequipmentsList (query) {
  return request({
    url: '/function/inspection/task/verT/equipments/list',
    method: 'get',
    params: query
  })
}
// 下载
/**
 * 
 * @param {*} data //入参
 * @param {*} filename //下载文件名称以及文件后缀为文件类型
 * @returns 
 */
export function downloadequipments (data, filename) {
  return download(
    '/function/inspection/task/verT/equipments/export',
    data,
    filename
  )
}
// 获取地图区域点位
export function getSelectinspectionTaskInfo (query) {
  return request({
    url: '/function/home/page/inspectionTaskInfo/list',
    method: 'get',
    params: query
  })
}
// 获取地图轨迹路线
export function getSelectinspectionroutes (query) {
  return request({
    url: '/function/inspection/routes/list',
    method: 'get',
    params: query
  })
}